# -*- coding: utf-8 -*-
#    Copyright (C) 2012  Ruslan V. Us <unclerus@gmail.com>, Aleksandr V. Bannov <kokudzin@gmail.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

import ConfigParser

class Settings (object):
    '''
    Настройки 
    '''
    def __init__ (self, configFile, section = 'default'):
        config = ConfigParser.ConfigParser ()
        config.read ([configFile])
        self.diffUrlFrequency = config.getint (section, 'diff_url_frequency')
        self.diffUrlCount = config.getint (section, 'diff_url_count')
        self.oneUrlFrequency = config.getint (section, 'one_url_frequency')
        self.oneUrlCount = config.getint (section, 'one_url_count')
        self.frequency = config.getint (section, 'frequency')
        self.clientsCleanFrequency = config.getint (section, 'clients_clean_frequency')
        self.userAgents = config.getint (section, 'useragents')
        self.clientDropTimeout = config.getint (section, 'client_drop_timeout')
        